home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / GNU_KIT / DISK8.ZIP / src / makest / make.diff < prev    next >
Encoding:
Text File  |  1991-08-08  |  11.2 KB  |  463 lines

  1. diff -c make-3.60/Makefile make-st/Makefile
  2. *** make-3.60/Makefile    Sat May 25 02:53:38 1991
  3. --- make-st/Makefile    Tue Jul 30 16:02:12 1991
  4. ***************
  5. *** 19,26 ****
  6.   #    Makefile for GNU Make
  7.   #
  8.   
  9. ! CFLAGS = $(defines) -g
  10. ! LDFLAGS = -g
  11.   
  12.   # Define nothing for BSD, USG for System V, and USGr3 (as well as USG) for
  13.   # SVR3, HPUX for HP-UX (as well as USG or USGr3 as appropriate).  If you have a
  14. --- 19,26 ----
  15.   #    Makefile for GNU Make
  16.   #
  17.   
  18. ! CFLAGS = $(defines) -O
  19. ! LDFLAGS = -s
  20.   
  21.   # Define nothing for BSD, USG for System V, and USGr3 (as well as USG) for
  22.   # SVR3, HPUX for HP-UX (as well as USG or USGr3 as appropriate).  If you have a
  23. ***************
  24. *** 32,38 ****
  25.   # If you want to avoid use of floating-point numbers, define NO_FLOAT.  If your
  26.   # compiler can handle `enum' bitfields (and it's not GCC), define
  27.   # ENUM_BITFIELDS.
  28. ! defines =
  29.   
  30.   # Define UMAX here to use Encore's inq_stats call.  Define UMAX_43 (and UMAX)
  31.   # if you have UMAX 4.3 instead of UMAX 4.2.  If the load average is in a symbol
  32. --- 32,38 ----
  33.   # If you want to avoid use of floating-point numbers, define NO_FLOAT.  If your
  34.   # compiler can handle `enum' bitfields (and it's not GCC), define
  35.   # ENUM_BITFIELDS.
  36. ! defines = -DNO_FLOAT
  37.   
  38.   # Define UMAX here to use Encore's inq_stats call.  Define UMAX_43 (and UMAX)
  39.   # if you have UMAX 4.3 instead of UMAX 4.2.  If the load average is in a symbol
  40. ***************
  41. *** 43,49 ****
  42.   # union, rather than a simple `n_name' member, define NLIST_NAME_UNION.  If the
  43.   # `n_name' member of a `struct nlist' is an array that must be copied into,
  44.   # define NLIST_NAME_ARRAY.  Otherwise, define NO_LDAV.
  45. ! LOAD_AVG =
  46.   
  47.   # If you don't want archive support, comment these out.
  48.   ARCHIVES = arscan.o ar.o
  49. --- 43,49 ----
  50.   # union, rather than a simple `n_name' member, define NLIST_NAME_UNION.  If the
  51.   # `n_name' member of a `struct nlist' is an array that must be copied into,
  52.   # define NLIST_NAME_ARRAY.  Otherwise, define NO_LDAV.
  53. ! LOAD_AVG = -DNLIST_NAME_UNION -DNO_LDAV
  54.   
  55.   # If you don't want archive support, comment these out.
  56.   ARCHIVES = arscan.o ar.o
  57. ***************
  58. *** 108,113 ****
  59. --- 108,117 ----
  60.   make: $(objs)
  61.       $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
  62.       mv -f make.new make
  63. + make.sym: $(objs)
  64. +     /usr/gcc/bin/sym-ld.ttp -o x.sym /usr/gcc/lib/crt0.o $(objs) $(LOADLIBES) -lgnu
  65. +     /usr/gcc/bin/gcc-ld.ttp -o x.ttp /usr/gcc/lib/crt0.o $(objs) $(LOADLIBES) -lgnu
  66.   
  67.   load.o: load.c
  68.       $(CC) $(CFLAGS) $(LOAD_AVG) -c load.c
  69. diff -c make-3.60/arscan.c make-st/arscan.c
  70. *** make-3.60/arscan.c    Thu Apr 11 18:01:14 1991
  71. --- make-st/arscan.c    Tue Jul 30 16:05:26 1991
  72. ***************
  73. *** 25,31 ****
  74. --- 25,35 ----
  75.   #define PORTAR 1
  76.   #endif
  77.   
  78. + #ifdef atarist
  79. + #include <gnu-ar.h>
  80. + #else
  81.   #include <ar.h>
  82. + #endif
  83.   #include <stdio.h>
  84.   #include <sys/types.h>
  85.   #include <sys/stat.h>
  86. diff -c make-3.60/commands.c make-st/commands.c
  87. *** make-3.60/commands.c    Wed Dec 26 18:12:02 1990
  88. --- make-st/commands.c    Tue Jul 30 16:05:46 1991
  89. ***************
  90. *** 341,346 ****
  91. --- 341,347 ----
  92.        int sig;
  93.   {
  94.     signal (sig, SIG_DFL);
  95. + #ifndef atarist
  96.   #ifndef USG
  97.     (void) sigsetmask (0);
  98.   #endif
  99. ***************
  100. *** 386,391 ****
  101. --- 387,393 ----
  102.       wait_for_children (0, 1);
  103.   
  104.     /* Delete any non-precious intermediate files that were made.  */
  105. + #endif /* atarist */
  106.   
  107.     remove_intermediates (1);
  108.   
  109. diff -c make-3.60/default.c make-st/default.c
  110. *** make-3.60/default.c    Wed Jan 23 03:19:32 1991
  111. --- make-st/default.c    Mon Aug  5 17:52:14 1991
  112. ***************
  113. *** 28,36 ****
  114. --- 28,41 ----
  115.      `.s' must come last, so that a `.o' file will be made from
  116.      a `.c' or `.p' or ... file rather than from a .s file.  */
  117.   
  118. + #ifdef atarist
  119.   static char default_suffixes[]
  120. +   = ".out .a .o .c .cc .y .l .s .S .h .info .dvi .tex .texinfo .sh .elc .el";
  121. + #else
  122. + static char default_suffixes[]
  123.     = ".out .a .ln .o .c .cc .p .f .F .r .y .l .s .S \
  124.   .mod .sym .def .h .info .dvi .tex .texinfo .cweb .web .sh .elc .el";
  125. + #endif
  126.   
  127.   static struct pspec default_pattern_rules[] =
  128.     {
  129. ***************
  130. *** 53,58 ****
  131. --- 58,67 ----
  132.       "test -f $@ || $(CO) $(COFLAGS) $< $@",
  133.       "%", "RCS/%,v",
  134.       "test -f $@ || $(CO) $(COFLAGS) $< $@",
  135. + #ifdef atarist
  136. +     "%", "rcs/%,v",
  137. +     "test -f $@ || $(CO) $(COFLAGS) $< $@",
  138. + #endif
  139.   
  140.       /* SCCS.  */
  141.       "%", "s.%",
  142. diff -c make-3.60/function.c make-st/function.c
  143. *** make-3.60/function.c    Thu Sep 13 17:53:56 1990
  144. --- make-st/function.c    Tue Jul 30 16:05:52 1991
  145. ***************
  146. *** 345,350 ****
  147. --- 345,353 ----
  148.       else
  149.         buf[0] = '\0';
  150.   
  151. + #ifdef atarist
  152. +     perror_with_name (buf, "function not allowed under TOS");
  153. + #else
  154.       if (pipe (pipedes) < 0)
  155.         {
  156.           perror_with_name (buf, "pipe");
  157. ***************
  158. *** 438,443 ****
  159. --- 441,447 ----
  160.   
  161.       pop_signals_blocked_p ();
  162.   
  163. + #endif /* atarist */
  164.       free (text);
  165.       break;
  166.         }
  167. diff -c make-3.60/job.c make-st/job.c
  168. *** make-3.60/job.c    Wed May  8 14:47:02 1991
  169. --- make-st/job.c    Tue Jul 30 16:05:38 1991
  170. ***************
  171. *** 24,30 ****
  172. --- 24,34 ----
  173.   #include <errno.h>
  174.   
  175.   /* Default path to search for executables.  */
  176. + #ifdef atarist
  177. + static char default_path[] = ";/bin";
  178. + #else
  179.   static char default_path[] = ":/bin:/usr/bin";
  180. + #endif
  181.   
  182.   /* Default shell to use.  */
  183.   char default_shell[] = "/bin/sh";
  184. ***************
  185. *** 83,92 ****
  186. --- 87,106 ----
  187.   
  188.   #else    /* WTERMSIG not defined and have <sys/wait.h> or not USG.  */
  189.   
  190. + #ifdef atarist
  191. + #  define WAIT_T int
  192. + #  define WTERMSIG(x) 0
  193. + #  define WCOREDUMP(x) 0
  194. + #  define WEXITSTATUS(x)  x
  195. + #  define WIFSIGNALED(x) (WTERMSIG (x) != 0)
  196. + #  define WIFEXITED(x) (WTERMSIG (x) == 0)
  197. + #  undef WAIT_NOHANG
  198. + #else
  199.   #define WAIT_T union wait
  200.   #define WTERMSIG(x)    ((x).w_termsig)
  201.   #define WCOREDUMP(x)    ((x).w_coredump)
  202.   #define WEXITSTATUS(x)    ((x).w_retcode)
  203. + #endif /* atarist */
  204.   #ifndef    WIFSIGNALED
  205.   #define    WIFSIGNALED(x)    (WTERMSIG(x) != 0)
  206.   #endif
  207. ***************
  208. *** 204,210 ****
  209. --- 218,226 ----
  210.   #else    /* Not USG.  */
  211.   
  212.     /* Block the signals.  */
  213. + #ifndef atarist
  214.     (void) sigblock (fatal_signal_mask | sigmask (SIGCHLD));
  215. + #endif /* atarist */
  216.   
  217.   #endif
  218.   
  219. ***************
  220. *** 225,231 ****
  221. --- 241,249 ----
  222.   #else    /* Not USG.  */
  223.   
  224.     /* Unblock the signals.  */
  225. + #ifndef atarist
  226.     (void) sigsetmask (sigblock (0) & ~(fatal_signal_mask | sigmask (SIGCHLD)));
  227. + #endif
  228.   
  229.   #endif
  230.   
  231. ***************
  232. *** 687,692 ****
  233. --- 705,711 ----
  234.     
  235.     /* Set up a bad standard input that reads from a broken pipe.  */
  236.   
  237. + #ifndef atarist
  238.     if (bad_stdin == -1)
  239.       {
  240.         /* Make a file descriptor that is the read end of a broken pipe.
  241. ***************
  242. *** 700,705 ****
  243. --- 719,725 ----
  244.         bad_stdin = pd[0];
  245.       }
  246.       }
  247. + #endif
  248.   
  249.     /* Decide whether to give this child the `good' standard input
  250.        (one that points to the terminal or whatever), or the `bad' one
  251. ***************
  252. *** 860,865 ****
  253. --- 880,886 ----
  254.     if (stdout_fd != 1)
  255.       (void) dup2 (stdout_fd, 1);
  256.   
  257. + #ifndef atarist
  258.     /* Free up file descriptors.  */
  259.     {
  260.       register int d;
  261. ***************
  262. *** 867,872 ****
  263. --- 888,894 ----
  264.       for (d = 3; d < max; ++d)
  265.         (void) close (d);
  266.     }
  267. + #endif /* atarist */
  268.   
  269.     /* Don't block signals for the new process.  */
  270.     unblock_signals ();
  271. ***************
  272. *** 892,897 ****
  273. --- 914,964 ----
  274.         return 1;
  275.       }
  276.     else
  277. + #ifdef atarist
  278. +   {
  279. +       static char  * * _extensions = 0,  * suff;
  280. +       char         * p,  * q;
  281. +       int            i;
  282. +       
  283. +       if ( _extensions == 0 )
  284. +       {
  285. +       if ( ( p == (char*)getenv( "SUFF" ) ) != 0 && *p )
  286. +       {
  287. +           suff = (char*) xmalloc( strlen( p ) + 1 );
  288. +           strcpy( suff, p );
  289. +           for ( i = 1, q = suff;  *q;  q++ )
  290. +           if ( *q == ',' || *q == ';' )
  291. +               i++;
  292. +           _extensions = (char**) xmalloc( i * sizeof( char* ) );
  293. +           _extensions[0] = suff;
  294. +           for ( i = 0, q = suff;  *q;  q++ )
  295. +           if ( *q == ',' || *q == ';' )
  296. +           {
  297. +               *q = '\0';
  298. +               _extensions[ ++i ] = q + 1;
  299. +           }
  300. +           _extensions[ ++i ] = 0;
  301. +       }
  302. +           else
  303. +           {
  304. +           _extensions = (char**) xmalloc( 5 * sizeof( char* ) );
  305. +           _extensions[0] = "ttp";
  306. +           _extensions[1] = "tos";
  307. +           _extensions[2] = "prg";
  308. +           _extensions[3] = "app";
  309. +           _extensions[4] = 0;
  310. +       }
  311. +       }
  312. +       p = (char*) findfile( file, path, _extensions );
  313. +       if ( p == NULL )
  314. +       return 0;
  315. +       else
  316. +       {
  317. +       strcpy( program, p );
  318. +       return 1;
  319. +       }
  320. +   }
  321. + #else
  322.       {
  323.         unsigned int len;
  324.   
  325. ***************
  326. *** 953,958 ****
  327. --- 1020,1026 ----
  328.       }
  329.   
  330.     return 0;
  331. + #endif /* atarist */
  332.   }
  333.   
  334.   /* Replace the current process with one running the command in ARGV,
  335. ***************
  336. *** 1020,1026 ****
  337.             new_argv[1 + argc] = argv[argc];
  338.             --argc;
  339.           }
  340.             execve (shell_path, new_argv, envp);
  341.             perror_with_name ("execve: ", shell_path);
  342.           }
  343. --- 1088,1093 ----
  344. ***************
  345. *** 1100,1106 ****
  346. --- 1167,1177 ----
  347.       /* Not a special char.  */
  348.       switch (*p)
  349.         {
  350. + #ifdef atarist
  351. +       case '@':
  352. + #else
  353.         case '\\':
  354. + #endif
  355.           if (p[1] != '\0' && p[1] != '\n')
  356.             /* Copy and skip the following char.  */
  357.             *ap++ = *++p;
  358. ***************
  359. *** 1202,1208 ****
  360. --- 1273,1283 ----
  361.         if (*p == '\\' || *p == '\''
  362.             || *p == ' ' || *p == '\t' || *p == '\n'
  363.             || index (sh_chars, *p) != 0)
  364. + #ifdef atarist
  365. +         *ap++ = '@';
  366. + #else
  367.           *ap++ = '\\';
  368. + #endif
  369.         *ap++ = *p;
  370.       }
  371.         *ap = '\0';
  372. Only in make-st: job.c.orig
  373. diff -c make-3.60/main.c make-st/main.c
  374. *** make-3.60/main.c    Thu May 16 13:59:20 1991
  375. --- make-st/main.c    Tue Jul 30 16:02:16 1991
  376. ***************
  377. *** 292,297 ****
  378. --- 292,301 ----
  379.     struct dep *read_makefiles;
  380.     char current_directory[MAXPATHLEN];
  381.   
  382. + #ifdef atarist
  383. +   _binmode( 0 );
  384. + #endif /* atarist */
  385.     default_goal_file = 0;
  386.     reading_filename = 0;
  387.     reading_lineno_ptr = 0;
  388. diff -c make-3.60/misc.c make-st/misc.c
  389. *** make-3.60/misc.c    Wed Apr 24 20:52:06 1991
  390. --- make-st/misc.c    Tue Jul 30 16:02:52 1991
  391. ***************
  392. *** 464,469 ****
  393. --- 464,470 ----
  394.   static void
  395.   init_access ()
  396.   {
  397. + #ifndef atarist
  398.     user_uid = getuid ();
  399.     user_gid = getgid ();
  400.   
  401. ***************
  402. *** 473,478 ****
  403. --- 474,480 ----
  404.     /* Do these ever fail?  */
  405.     if (user_uid == -1 || user_gid == -1 || make_uid == -1 || make_gid == -1)
  406.       pfatal_with_name ("get{e}[gu]id");
  407. + #endif /* atarist */
  408.   
  409.     current_access = make;
  410.   }
  411. ***************
  412. *** 479,487 ****
  413. --- 481,496 ----
  414.   
  415.   /* Give the process appropriate permissions for access to
  416.      user data (i.e., to stat files, or to spawn a child process).  */
  417. + #ifdef atarist
  418.   void
  419.   user_access ()
  420.   {
  421. +   current_access = user;
  422. + }
  423. + #else
  424. + void
  425. + user_access ()
  426. + {
  427.     if (!access_inited)
  428.       init_access ();
  429.   
  430. ***************
  431. *** 520,525 ****
  432. --- 529,535 ----
  433.   
  434.     current_access = user;
  435.   }
  436. + #endif /* atarist */
  437.   
  438.   /* Give the process appropriate permissions for access to
  439.      make data (i.e., the load average).  */
  440. ***************
  441. *** 526,531 ****
  442. --- 536,542 ----
  443.   void
  444.   make_access ()
  445.   {
  446. + #ifndef atarist
  447.     if (!access_inited)
  448.       init_access ();
  449.   
  450. ***************
  451. *** 545,550 ****
  452. --- 556,562 ----
  453.     if (setregid (user_gid, make_gid) < 0)
  454.       pfatal_with_name ("setregid");
  455.   #endif
  456. + #endif /* atarist */
  457.   
  458.     current_access = make;
  459.   }
  460.